﻿<%@ Page Language="C#" MasterPageFile="~/Admin/AdminMasterPage.master" AutoEventWireup="true"
    CodeFile="Assignments.aspx.cs" Inherits="Admin_Assignments" Title="Admin Page - Information Literacy Education" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" runat="Server">

    <script language="javascript" type="text/javascript">
        function Toggle(id)
        {
            var target = document.getElementById(id);
            if ( target.style.display == "none" )
            {
                target.style.display = "";
            }
            else
            {
                target.style.display = "none";
            }
            return;
        }
        
    </script>

    <h1>
        Manage Assignments</h1>
    <h2>
        Overview</h2>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <%--<div style="position: absolute; margin-top: -10px; margin-left: 500px; width: 100px;">
                <asp:Button ID="btnRefresh" runat="server" Text="Refresh" OnClick="lnkbtnRefresh_Click" />
            </div>--%>
            <div style="padding-left: 10px;">
                <h3>
                    Quiz Assignments</h3>
                <div style="padding-left: 10px;">
                    <asp:Button ID="btnQuizNew" runat="server" PostBackUrl="~/Admin/Assignments_Quiz.aspx?Mode=Create"
                        Text="Assign New Quizzes" />
                    &nbsp;&nbsp;
                    <asp:Button ID="btnQuizEdit" runat="server" PostBackUrl="~/Admin/Assignments_Quiz.aspx?Mode=Edit"
                        Text="Edit Quizzes" />
                    <br />
                    <br />
                    <h4>
                        On-going Quizzes</h4>
                    <asp:Label ID="lblNoOngoingQuizzes" runat="server" Text="<div style='width: 550px; text-align: center; font-weight: bold; font-size: 9pt; padding-bottom: 10px; color: #999;'>There is no on-going quiz at this moment.</div>"
                        Visible="false" />
                    <asp:Repeater ID="RepeaterOngoingQuizzes" runat="server" Visible="false" OnItemDataBound="RepeaterOngoingQuizzes_ItemDataBound">
                        <HeaderTemplate>
                            <ul style="margin-top: 0px;">
                        </HeaderTemplate>
                        <ItemTemplate>
                            <li>[<asp:Label ID="lblClassTitle" runat="server" />] &nbsp;
                                <asp:Label ID="lblAssignmentTitle" runat="server" />
                                will end in
                                <asp:Label ID="lblRemainingTime" runat="server" />
                                . &nbsp; <a href="javascript: Toggle('SectionsQuizOnGoing<%#_tempCounter.ToString() %>')">
                                    View Sections</a>
                                <div id="SectionsQuizOnGoing<%#_tempCounter.ToString() %>" style="margin: 10px; padding: 5px;
                                    border: solid 1px #999; display: none;">
                                    <asp:Repeater ID="RepeaterOngoingQuizzesSections" runat="server" OnItemDataBound="RepeaterQuizzesSections_ItemDataBound">
                                        <ItemTemplate>
                                            <b>
                                                <asp:Label ID="lblSectionNumber" runat="server" /></b>
                                        </ItemTemplate>
                                        <SeparatorTemplate>
                                            ,
                                        </SeparatorTemplate>
                                    </asp:Repeater>
                                </div>
                            </li>
                        </ItemTemplate>
                        <FooterTemplate>
                            </ul>
                        </FooterTemplate>
                    </asp:Repeater>
                    <h4>
                        Upcoming Quizzes</h4>
                    <asp:Label ID="lblNoUpcomingQuizzes" runat="server" Text="<div style='width: 550px; text-align: center; font-weight: bold; font-size: 9pt; padding-bottom: 10px; color: #999;'>There is no Upcoming quiz at this moment.</div>"
                        Visible="false" />
                    <asp:Repeater ID="RepeaterUpcomingQuizzes" runat="server" Visible="false" OnItemDataBound="RepeaterUpcomingQuizzes_ItemDataBound">
                        <HeaderTemplate>
                            <ul style="margin-top: 0px;">
                        </HeaderTemplate>
                        <ItemTemplate>
                            <li>[<asp:Label ID="lblClassTitle" runat="server" />] &nbsp;
                                <asp:Label ID="lblAssignmentTitle" runat="server" />
                                will begin in
                                <asp:Label ID="lblRemainingTime" runat="server" />. &nbsp; <a href="javascript: Toggle('SectionsQuizUpcoming<%#_tempCounter.ToString() %>')">
                                    View Sections</a>
                                <div id="SectionsQuizUpcoming<%#_tempCounter.ToString() %>" style="margin: 10px;
                                    padding: 5px; border: solid 1px #999; display: none;">
                                    <asp:Repeater ID="RepeaterUpcomingQuizzesSections" runat="server" OnItemDataBound="RepeaterQuizzesSections_ItemDataBound">
                                        <ItemTemplate>
                                            <b>
                                                <asp:Label ID="lblSectionNumber" runat="server" /></b>
                                        </ItemTemplate>
                                        <SeparatorTemplate>
                                            ,
                                        </SeparatorTemplate>
                                    </asp:Repeater>
                                </div>
                            </li>
                        </ItemTemplate>
                        <FooterTemplate>
                            </ul>
                        </FooterTemplate>
                    </asp:Repeater>
                    <h4>
                        Quizzes ended last
                        <asp:DropDownList ID="ddlistQuizEndedDayOption" runat="server" Height="22" Font-Size="Smaller"
                            AutoPostBack="true" OnSelectedIndexChanged="ddlistQuizEndedDayOption_SelectedIndexChanged">
                            <asp:ListItem Value="3" Selected="True">3 Days</asp:ListItem>
                            <asp:ListItem Value="7">7 Days</asp:ListItem>
                            <asp:ListItem Value="14">14 Days</asp:ListItem>
                            <asp:ListItem Value="30">30 Days</asp:ListItem>
                            <asp:ListItem Value="All">All</asp:ListItem>
                        </asp:DropDownList>
                    </h4>
                    <asp:Label ID="lblNoEndedQuizzes" runat="server" Visible="false" />
                    <asp:Repeater ID="RepeaterEndedQuizzes" runat="server" Visible="false" OnItemDataBound="RepeaterEndedQuizzes_ItemDataBound">
                        <HeaderTemplate>
                            <ul style="margin-top: 0px;">
                        </HeaderTemplate>
                        <ItemTemplate>
                            <li>
                                [<asp:Label ID="lblClassTitle" runat="server" />] &nbsp;
                                <asp:Label ID="lblAssignmentTitle" runat="server" />
                                has ended
                                <asp:Label ID="lblPassedTime" runat="server" />
                                ago. &nbsp; <a href="javascript: Toggle('SectionsQuizEnded<%#_tempCounter.ToString() %>')">
                                    View Sections</a>
                                <div id="SectionsQuizEnded<%#_tempCounter.ToString() %>" style="margin: 10px; padding: 5px;
                                    border: solid 1px #999; display: none;">
                                    <asp:Repeater ID="RepeaterEndedQuizzesSections" runat="server" OnItemDataBound="RepeaterQuizzesSections_ItemDataBound">
                                        <ItemTemplate>
                                            <b>
                                                <asp:Label ID="lblSectionNumber" runat="server" /></b>
                                        </ItemTemplate>
                                        <SeparatorTemplate>
                                            ,
                                        </SeparatorTemplate>
                                    </asp:Repeater>
                                </div>
                            </li>
                        </ItemTemplate>
                        <FooterTemplate>
                            </ul>
                        </FooterTemplate>
                    </asp:Repeater>
                </div>
                <h3>
                    Essay Assignments</h3>
                <div style="padding-left: 10px;">
                    <asp:Button ID="btnEssayNew" runat="server" Width="250" PostBackUrl="~/Admin/Assignments_Essay.aspx?Mode=Create"
                        Text="Assign New Essay Assignments" />
                    &nbsp;&nbsp;
                    <asp:Button ID="btnEssayEdit" runat="server" Width="200" PostBackUrl="~/Admin/Assignments_Essay.aspx?Mode=Edit"
                        Text="Edit Essay Assignments" />
                    <br />
                    <br />
                    <h4>
                        On-going Essays</h4>
                    <asp:Label ID="lblNoOngoingEssays" runat="server" Text="<div style='width: 550px; text-align: center; font-weight: bold; font-size: 9pt; padding-bottom: 10px; color: #999;'>There is no on-going essay at this moment.</div>"
                        Visible="false" />
                    <asp:Repeater ID="RepeaterOngoingEssays" runat="server" Visible="false" OnItemDataBound="RepeaterOngoingEssays_ItemDataBound">
                        <HeaderTemplate>
                            <ul style="margin-top: 0px;">
                        </HeaderTemplate>
                        <ItemTemplate>
                            <li>
                                [<asp:Label ID="lblClassTitle" runat="server" />]
                                &nbsp;
                                <asp:Label ID="lblAssignmentTitle" runat="server" />
                                will end in
                                <asp:Label ID="lblRemainingTime" runat="server" Text="Label"></asp:Label>
                                . &nbsp; <a href="javascript: Toggle('SectionsEssayOnGoing<%#_tempCounter.ToString() %>')">
                                    View Sections</a>
                                <div id="SectionsEssayOnGoing<%#_tempCounter.ToString() %>" style="margin: 10px;
                                    padding: 5px; border: solid 1px #999; display: none;">
                                    <asp:Repeater ID="RepeaterOngoingEssaysSections" runat="server" OnItemDataBound="RepeaterEssaysSections_ItemDataBound">
                                        <ItemTemplate>
                                            <b>
                                                <asp:Label ID="lblSectionNumber" runat="server" /></b>
                                        </ItemTemplate>
                                        <SeparatorTemplate>
                                            ,
                                        </SeparatorTemplate>
                                    </asp:Repeater>
                                </div>
                            </li>
                        </ItemTemplate>
                        <FooterTemplate>
                            </ul>
                        </FooterTemplate>
                    </asp:Repeater>
                    <h4>
                        Upcoming Essays</h4>
                    <asp:Label ID="lblNoUpcomingEssays" runat="server" Text="<div style='width: 550px; text-align: center; font-weight: bold; font-size: 9pt; padding-bottom: 10px; color: #999;'>There is no Upcoming essay at this moment.</div>"
                        Visible="false" />
                    <asp:Repeater ID="RepeaterUpcomingEssays" runat="server" Visible="false" OnItemDataBound="RepeaterUpcomingEssays_ItemDataBound">
                        <HeaderTemplate>
                            <ul style="margin-top: 0px;">
                        </HeaderTemplate>
                        <ItemTemplate>
                            <li>
                                [<asp:Label ID="lblClassTitle" runat="server" />]
                                &nbsp;
                                <asp:Label ID="lblAssignmentTitle" runat="server" />
                                will begin in <asp:Label ID="lblRemainingTime" runat="server" />. &nbsp; <a href="javascript: Toggle('SectionsEssayUpcoming<%#_tempCounter.ToString() %>')">
                                    View Sections</a>
                                <div id="SectionsEssayUpcoming<%#_tempCounter.ToString() %>" style="margin: 10px;
                                    padding: 5px; border: solid 1px #999; display: none;">
                                    <asp:Repeater ID="RepeaterUpcomingEssaysSections" runat="server" OnItemDataBound="RepeaterEssaysSections_ItemDataBound">
                                        <ItemTemplate>
                                            <b>
                                                <asp:Label ID="lblSectionNumber" runat="server" /></b>
                                        </ItemTemplate>
                                        <SeparatorTemplate>
                                            ,
                                        </SeparatorTemplate>
                                    </asp:Repeater>
                                </div>
                            </li>
                        </ItemTemplate>
                        <FooterTemplate>
                            </ul>
                        </FooterTemplate>
                    </asp:Repeater>
                    <h4>
                        Essays ended last
                        <asp:DropDownList ID="ddlistEssayEndedDayOption" runat="server" Height="22" Font-Size="Smaller"
                            AutoPostBack="true" OnSelectedIndexChanged="ddlistEssayEndedDayOption_SelectedIndexChanged">
                            <asp:ListItem Value="3" Selected="True">3 Days</asp:ListItem>
                            <asp:ListItem Value="7">7 Days</asp:ListItem>
                            <asp:ListItem Value="14">14 Days</asp:ListItem>
                            <asp:ListItem Value="30">30 Days</asp:ListItem>
                            <asp:ListItem Value="All">All</asp:ListItem>
                        </asp:DropDownList>
                    </h4>
                    <asp:Label ID="lblNoEndedEssays" runat="server" Visible="false" />
                    <asp:Repeater ID="RepeaterEndedEssays" runat="server" Visible="false" OnItemDataBound="RepeaterEndedEssays_ItemDataBound">
                        <HeaderTemplate>
                            <ul style="margin-top: 0px;">
                        </HeaderTemplate>
                        <ItemTemplate>
                            <li>
                                [<asp:Label ID="lblClassTitle" runat="server" />]
                                &nbsp;
                                <asp:Label ID="lblAssignmentTitle" runat="server" />
                                has ended <asp:Label ID="lblPassedTime" runat="server" /> ago. &nbsp; <a href="javascript: Toggle('SectionsEssayEnded<%#_tempCounter.ToString() %>')">
                                    View Sections</a>
                                <div id="SectionsEssayEnded<%#_tempCounter.ToString() %>" style="margin: 10px; padding: 5px;
                                    border: solid 1px #999; display: none;">
                                    <asp:Repeater ID="RepeaterEndedEssaysSections" runat="server" OnItemDataBound="RepeaterEssaysSections_ItemDataBound">
                                        <ItemTemplate>
                                            <b>
                                                <asp:Label ID="lblSectionNumber" runat="server" /></b>
                                        </ItemTemplate>
                                        <SeparatorTemplate>
                                            ,
                                        </SeparatorTemplate>
                                    </asp:Repeater>
                                </div>
                            </li>
                        </ItemTemplate>
                        <FooterTemplate>
                            </ul>
                        </FooterTemplate>
                    </asp:Repeater>
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
